<header id="page-header"> 
    <h1>Mail Şablonları</h1> 
</header>

<nav id="shortcuts">
    <ul>
        <li><a href="<?php echo site_url('backend/mail_template/add') ?>" class="add">Yeni Şablon</a></li>
    </ul>
    <br class="clear-both" />
</nav>

<div id="content">
	<?php echo $this->session->flashdata('status'); ?>
	
	<h3>Mail Şablonları (<?php echo $result['total_rows']; ?>)</h3>

	<table class="list">

		<thead>
            <tr>
                <th>Şablon Adı</th>
                <th>Oluşturulma Tarihi</th>
                <th>İşlemler</th>
            </tr>
		</thead>

		<tbody>
			<?php if($result['total_rows']): ?>
				<?php foreach ($result['rows'] as $row): ?>
                    <tr>
                        <td><?php echo $row->name ?></td>
                        <td><?php echo format_date($row->date_add) ?></td>
                        <td>
                            <a href="<?php echo site_url("backend/mail_template/preview/{$row->id}"); ?>" title="Ön İzleme" target="_blank"><img src="assets/backend/icon/luna/zoom.png" alt="" /></a>
                            <a href="<?php echo site_url("backend/mail_template/edit/{$row->id}"); ?>" title="Şablonu Düzenle" ><img src="assets/backend/icon/luna/edit.png" alt="" /></a>
                            <a href="<?php echo site_url("backend/mail_template/delete/{$row->id}"); ?>" title="Şablonu Sil" onclick="return confirm('Silmek istediğinizden eminmisiniz?');"><img src="assets/backend/icon/luna/delete.png" alt="" /></a>
                        </td>
                    </tr>					
				<?php endforeach; ?>
			<?php else: ?>

				<tr>
					<td colspan="3">
						<div class="notification info">Bu gurupta herhangi bir abone bulunmamaktadır.</div>
					</td>
				</tr>

			<?php endif; ?>
		</tbody>

	</table>

	<?php echo $pagination; ?>

</div><!-- // #content -->
